package com.sohu.sip.auth.statistics.po;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/** @author Hibernate CodeGenerator */
public class RequestConcurrentMax implements Serializable {

    /** identifier field */
    private String serverName;

    /** identifier field */
    private int concurrentCount;

    /** identifier field */
    private java.util.Date time;

    /** full constructor */
    public RequestConcurrentMax(java.lang.String serverName, int concurrentCount, java.util.Date time) {
        this.serverName = serverName;
        this.concurrentCount = concurrentCount;
        this.time = time;
    }

    /** default constructor */
    public RequestConcurrentMax() {
    }

    public java.lang.String getServerName() {
        return this.serverName;
    }

    public void setServerName(java.lang.String serverName) {
        this.serverName = serverName;
    }

    public int getConcurrentCount() {
        return this.concurrentCount;
    }

    public void setConcurrentCount(int concurrentCount) {
        this.concurrentCount = concurrentCount;
    }

    public java.util.Date getTime() {
        return this.time;
    }

    public void setTime(java.util.Date time) {
        this.time = time;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("serverName", getServerName())
            .append("concurrentCount", getConcurrentCount())
            .append("time", getTime())
            .toString();
    }

    public boolean equals(Object other) {
        if ( !(other instanceof RequestConcurrentMax) ) return false;
        RequestConcurrentMax castOther = (RequestConcurrentMax) other;
        return new EqualsBuilder()
            .append(this.getServerName(), castOther.getServerName())
            .append(this.getConcurrentCount(), castOther.getConcurrentCount())
            .append(this.getTime(), castOther.getTime())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getServerName())
            .append(getConcurrentCount())
            .append(getTime())
            .toHashCode();
    }

}
